import 'package:feature_webview/webview_controller.dart';
import 'package:feature_webview/webview_page.dart';
import 'package:get/get.dart';
import 'package:wanandroid_client/features/counter_mvi/counter_binding.dart';
import 'package:wanandroid_client/features/counter_mvi/counter_view.dart';
import 'package:wanandroid_client/page/main/main_page.dart';
import 'package:wanandroid_client/page/main/main_page_binding.dart';
import 'package:wanandroid_client/route/route_names.dart';

class RoutePages {
  static List<GetPage> routes = [
    GetPage(
      name: RouteNames.mainPage,
      page: () => MainPage(),
      binding: MainPageBinding(),
    ),
    GetPage(
      name: RouteNames.counterPage,
      page: () => CounterPage(),
      binding: CounterBinding(),
    ),
    // GetPage(name: RouteNames.mainPage, page: () => const FeatureMainPage()),
    GetPage(
      name: RouteNames.webviewPage,
      page: () => WebviewPage(
        title: Get.parameters['title'] ?? '',
        url: Get.parameters['url'] ?? '',
      ),
      // binding: BindingsBuilder.put(() => WebviewController()),
      binding: BindingsBuilder(() {
        Get.lazyPut(() => WebviewController());
      }),
    ),
  ];
}
